tag @s add generic_arrow

#回收
data merge entity @s {item:{id:"arrow",components:{"!item_name":{},"!lore":{},"!consumable":{},"!use_cooldown":{}}},pickup:1}

#data
$data modify entity @s item.components."minecraft:custom_data" set from entity @s item.components."minecraft:custom_data".bag[$(select_arrow)]
data modify entity @s item.components."minecraft:item_model" set from entity @s item.components."minecraft:custom_data".item_model
data modify entity @s item.components.minecraft:item_name set from entity @s item.components."minecraft:custom_data".name
data remove entity @s item.components."minecraft:custom_data".count

#射出者是创造模式时
execute if function dab:system/generic_bow/is_arrow_bundle_arrow/if_archer_is_creative run data modify entity @s pickup set value 2b

#消耗owner箭矢
$execute on origin as @s[gamemode=!creative] run function dab:system/arrow_bundle/storage/arrow_count/remove {value:1,index:$(select_arrow)}